import request from '@/hook/interceptors'

// 获取user列表
export const userLogin = (data) => {
    return request({
        url: import.meta.env.VITE_USER_PATH + "/user/login",
        method: "post",
        data
    });
};

export const userInfo = () => {
    return request({
        url: import.meta.env.VITE_USER_PATH + "/user",
        method: "get",
    });
};

export const updateUserInfo = (data) => {
    return request({
        url: import.meta.env.VITE_USER_PATH + "/user",
        method: "patch",
        data
    });
};

export const userRegister = (data) => {
    return request({
        url: import.meta.env.VITE_USER_PATH + "/user/register",
        method: "post",
        data
    });
};

export const myCollect = (data) => {
    return request({
        url: import.meta.env.VITE_USER_PATH + "/user/collect",
        method: "get",
        data
    });
};